<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
<script type="text/javascript">
	$(function(){
		var ainput=document.getElementsByTagName("input");
		var atext=document.getElementsByTagName("textarea");
		for(var j=0;j<ainput.length;j++){
			ainput[j].readOnly=true;
			atext[j].readOnly=true;
		}
		
	})
</script>
</head>
<body>
    <h3>查看APP信息</h3>
   <h4>App基础信息</h4>
   <form action="" method="post" enctype="multipart/form-data"><!-- enctype="multipart/form-data"上傳圖片 -->
      <c:forEach var="list" items="${AppListById}">
      <table>
      
          <tr>
              <td>软件名称：</td>
		      <td><input placeholder="请输入软件名称" style="width:350px" type="text" id="softwareName" name="softwareName" value="${list.softwareName }"/> </td>
		 </tr>
		 <tr>
              <td>APK名称：</td>
		      <td><input placeholder="请输入APK名称" style="width:350px" type="text" id="APKName" name="APKName" value="${list.APKName }"/> </td>
		 </tr>
		 <tr>
              <td>支持ROM：</td>
		      <td><input placeholder="请输入支持的ROM" style="width:350px" type="text" id="supportROM" name="supportROM" value="${list.supportROM }" /> </td>
		 </tr>
		 <tr>
              <td>界面语言：</td>
		      <td><input placeholder="请输入软件支持的界面语言" style="width:350px" type="text" id="interfaceLanguage" name="interfaceLanguage" value="${list.interfaceLanguage }"/> </td>
		 </tr>
		 <tr>
              <td>软件大小：</td>
		      <td><input placeholder="请输入软件大小，单位为MB" style="width:350px" type="text" id="softwareSize" name="softwareSize" value="${list.softwareSize }"/> </td>
		 </tr>
		 <tr>
              <td>下载次数：</td>
		      <td><input placeholder="请输入下载次数" style="width:350px" type="text" id="downloads" name="downloads" value="${list.downloads }"/> </td>
		 </tr>
		 <tr>
              <td>所属平台：</td>
              <td><input  style="width:350px" type="text" id="flatformId" name="flatformId" value="${list.flatformName}"/> </td>
		 </tr>
		 <tr>
              <td>所属分类：</td>
		      <td>
		         <input type="text" style="width:350px" id="flatformId" name="flatformId" value="${list.categoryLevel1Name}/${list.categoryLevel2Name}/${list.categoryLevel3Name}"/> 
		     </td>
		 </tr>
		 <tr>
              <td>APP状态：</td>
		      <td ><input style="width:350px" type="text" id="status" name="status" value="${list.statusName}"></td>
		 </tr>
		 <tr>
              <td>应用简介：</td>
		      <td>
		      <textarea  rows="3" placeholder="请输入本软件的相关信息，本信息作为软件的详细信息进行软件的介绍" style="width:350px;overflow: hidden" id="appInfo" name="appInfo" >
		          
		      </textarea>
		       </td>
		 </tr>
		 <tr>
              <td>LOGO图片：</td>
		      <td> <img src="${list.logoPicPath}" width="150px"/></td>
		 </tr>
		 
      </table>
      </c:forEach>
      <h4>历史版本列表</h4>
      <table border="1">
	    <tr>
	      <td>软件名称</td><td>版本号</td><td>版本大小(单位：M)</td><td>发布状态</td><td>APK文件下载</td><td>最新更新时间</td>
	    </tr>
	    <c:forEach var="app" items="${appVersionList}">
	         <tr>
	            <td>${app.appInfo.softwareName}</td>
	            <td>${app.versionNo}</td>
	            <td>${app.versionSize}</td>
	            <td>${app.dataDictionary.valueName}</td>
	            <td>${app.apkFileName}</td>
	            <td><fmt:formatDate value="${app.modifyDate}"
						pattern="yyyy-MM-dd"></fmt:formatDate></td>
			    <td><input style="width:350px" type="hidden" id="appId" name="appId" value="${app.appId}" /> </td>
	         </tr>
	    </c:forEach>
     </table>
     <input  type="button"
					value="返回" id="return" onclick="window.location.href('index')"/>
   </form>
</body>
</html>